/*
 * 
 *  This file is part of Sourceprojects.org Lycia Copyright 2010 noctarius
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 * 
 */
package org.sourceprojects.lycia.fluent;

import org.sourceprojects.lycia.LyciaParser;
import org.sourceprojects.lycia.fluent.ConfigurationBuilderHelper.AbstractConfigurationBuilder;

/**
 * The interface defines a {@link FluentBuilder} configurator to be used while
 * building up an {@link LyciaParser} instance by using fluent DSL.<br>
 * Most implementations should extend {@link AbstractConfigurationBuilder}
 * instead of using this interface directly.
 * 
 * @author noctarius
 * @since 1.9.1
 * 
 * @param <B>
 *            Type of ContextObject
 */
public interface ConfigurationBuilder<B> {

	/**
	 * Returns the priority of the actual configurator. Lower value means that
	 * the configurator is executed earlier. The default value defined in
	 * {@link AbstractConfigurationBuilder} is 0.
	 * 
	 * @return The priority of the configurator
	 */
	int getPriority();

	/**
	 * Callback which is called by {@link FluentBuilder} to execute the
	 * configuration steps defined by this configurator.
	 * 
	 * @param xmlParser
	 *            Actual LyciaParser instance
	 */
	void configure(LyciaParser<B> xmlParser);

}
